﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
using Reviewer.Business;
using Reviewer.Entities;
using Reviewer.Entities.Services;

public partial class public_html_NewSite_CMSV2_GamesList : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            using (INewsService service = ServiceFactory.NewsService)
            {
                IOrderedEnumerable<News> newsItems = service.GetAll().OrderBy(t => t.Title);
                foreach (News item in newsItems)
                {
                    BullitList_Game.Items.Add(new ListItem(item.Title, String.Format("NewsManager.aspx?NewsId={0}", item.NewsId.ToString())));
                }
            }
        }
    }
}
